/*
 * @Author: myw
 * @Email: 516378746@qq.com
 * @Date: 2020-03-04 13:46:32
 * @Descripttion: 
 */
import { Injectable } from '@angular/core';

@Injectable({
    providedIn: 'root'
})
export class HCommonService {
    private title: string = "中钞油墨"
    constructor() { }

    getRoles(roleName: string) {
        let roles = JSON.parse(localStorage.getItem("roles"));
        let _rolesArr = {};
        roles.filter(item => {
            let _temp = item.split(":");
            if (_temp[0] === roleName) {
                _rolesArr[_temp[1]] = true
            }
        })
        return _rolesArr
    }

    setDocTitle(title) {
        let _title = `${this.title}---${title}`;
        document.title = _title;
    }

}
